MWPW-195996: Flex card configurations updates#6302
Conversation
* Adds logic for the webClientVersion and susi success logging * c2 changes * tabindexes
* Safari sometimes gets the wrong window height * Removing modal height update * Removing all the resize logic * Changes for c2
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
There was a problem hiding this comment.
Approving. A couple of things to double-check:
Double-check these
defaultStateis missingflexCardShowDateOnFooter: false. Every sibling flex prop has an explicit default; this one currently relies onundefinedbeing falsy. Adding it keeps things consistent and safe if the include-guard logic ever changes.- The old
flexCardHideFooter: falseis still indefaultStatebut nothing reads it anymore (grepped the repo, it's dead after this rename). Let's remove it as part of the change.
Tests
- The test changes only assert
products: {}on the default configs. Could we add coverage for the new logic itself: thedetailsTextOption === 'productName'branch callinggetProductsand populatingproducts, andflexCardShowDateOnFooter: trueproducing theflexCardblock withshowDateOnFooter: true? The renderer side is tested incaas, but milo's owngetProducts/conditional-fetch path is currently untested.
|
Concern: There's a three-way mismatch introduced by adding
Suggested fix — two options:
|
Summary
flexCardHideFooteroption withflexCardShowDateOnFooterto control date visibility on the flex card footerhiddenandproductNameoptions todetailsTextOption, and adefaultoption toflexCardTextAligngetProductshelper to fetch CaaS product tags whendetailsTextOptionis set toproductName, passed throughgetConfigasproductsJira Ticket
Resolves: MWPW-195996
Changes
libs/blocks/caas-config/caas-config.js— updatedflexCardTextAlign/detailsTextOptionoption labels; replaced "Hide Footer (CTA)" checkbox with "Show Date on Footer"libs/blocks/caas/utils.js— addedgetProducts, wiredproductsintogetConfigoutput, renamedflexCardHideFooter→flexCardShowDateOnFooterin config and default statetest/blocks/caas-config/expectedConfigs/defaultConfig.js,test/blocks/caas/utils.test.js— updated expected configs to includeproducts: {}Test plan
detailsTextOption: 'productName'fetches and displays product names on cardsTest URLs
Before: https://main--milo--adobecom.aem.page/?martech=off
After: https://MWPW-195996--milo--adobecom.aem.page/?martech=off